package com.sc.nft.entity.dto;

import com.sc.nft.enums.TradingPoolTransactionTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class TradingPoolCalculatePriceRatioRangeDTO {
    @ApiModelProperty("唯一标识")
    private Long id;

    @ApiModelProperty("最大涨幅")
    private BigDecimal maxIncreasePercentage;

    @ApiModelProperty("最大跌幅")
    private BigDecimal maxDecreasePercentage;

    @ApiModelProperty("操作")
    private TradingPoolTransactionTypeEnum transactionType;

    public void setMaxIncreasePercentage(BigDecimal maxIncreasePercentage) {
        this.maxIncreasePercentage = maxIncreasePercentage.movePointLeft(2);
    }

    public void setMaxDecreasePercentage(BigDecimal maxDecreasePercentage) {
        this.maxDecreasePercentage = maxDecreasePercentage.movePointLeft(2);
    }
}
